﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using V2TEK.NET.SH.Silverlight.Calendar;
using V2TEK.NET.SH.Silverlight.Charts.Core.Schedule;

namespace V2TEK.NET.SH.Silverlight.GanttView
{
    public class CommonCalendar : WorkCalendar, ICalendar
    {
        public CommonCalendar()
        {
            WorkingTime[] wt = new WorkingTime[] { new WorkingTime(TimeSpan.FromHours(0), TimeSpan.FromHours(24)) };
            base.SetWorkingTimes(DayOfWeek.Monday, wt);
            base.SetWorkingTimes(DayOfWeek.Tuesday, wt);
            base.SetWorkingTimes(DayOfWeek.Wednesday, wt);
            base.SetWorkingTimes(DayOfWeek.Thursday, wt);
            base.SetWorkingTimes(DayOfWeek.Friday, wt);

        }

        public TimeSpan GetWorkTime(DateTime start, DateTime end)
        {
            TimeSpan result = base.WorkBetween(start, end.AddDays(1));
            return result;
        }
    }
}
